import psutil
# 
# print(psutil.cpu_percent(interval=1, percpu=True))
# print(psutil.cpu_count())
# print(psutil.cpu_count(logical=False))
# memory = psutil.virtual_memory()
# print(round(memory.free / (1024 ** 3), 2))
# print(round(memory.total / (1024 ** 3), 2))
# print(psutil.cpu_freq())
# print(psutil.disk_partitions())
# print(psutil.disk_io_counters())
def SUM(s) -> float:
    k = 0.0
    for _ in s:
        k += _
    return k
def get_cpu_percent() -> int:
    percents:list = psutil.cpu_percent(percpu=True)
    percent:float = SUM(percents) / len(percents)
    return round(percent)

def get_memory_percent() -> int:
    memory = psutil.virtual_memory()
    percent = 1 - (memory.free / memory.total)
    return round(percent * 100)